package com.dbtimer.dbupdatespring.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dbtimer.dbupdatespring.dao.DmLastDataDao;
import com.dbtimer.dbupdatespring.entity.LastDataEntity;
import com.dbtimer.dbupdatespring.service.LastDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author swx
* @description 针对表【LastData】的数据库操作Service实现
* @createDate 2022-04-15 11:34:46
*/

@Service("lastDataService")
public class LastDataServiceImpl extends ServiceImpl<DmLastDataDao, LastDataEntity>
    implements LastDataService{

    @Autowired
    DmLastDataDao dmLastDataDao;

    /**
    * @Author swx
    * @Description 取出所有LastData表中的实体
    * @Date 23:08 2022/4/17
    * @Param []
    * @Return java.util.List<com.dbtimer.dbupdatespring.entity.LastDataEntity>
    */
    @Override
    public List<LastDataEntity> getAll(){
        QueryWrapper<LastDataEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.select();
        return dmLastDataDao.selectList(queryWrapper);
    }
}




